package com.zzy.sqlSession;

import java.beans.IntrospectionException;
import java.lang.reflect.InvocationTargetException;
import java.sql.SQLException;
import java.util.List;

/**
 * 文件描述: <br>
 * 版权所有: Copyright (c) 2021/5/1<br>
 * 完成日期: 2021/5/1<br>
 *
 * @author zainzhang
 */
public interface SqlSession {

    <T> T selectOne(String statementId, Object... params) throws SQLException, NoSuchFieldException, IllegalAccessException, IntrospectionException, InvocationTargetException, InstantiationException, NoSuchMethodException, Exception;

    <E> List<E> selectList(String statementId, Object... params) throws SQLException, NoSuchFieldException, IllegalAccessException, IntrospectionException, InvocationTargetException, InstantiationException, NoSuchMethodException, Exception;

    int insert(String statementId, Object... params) throws Exception;

    int update(String statementId, Object... params) throws Exception;

    int delete(String statementId, Object... params) throws Exception;

    <T> T getMapper(Class<?> mapperClass);

    void close() throws SQLException;
}
